<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>组件的注册</title>
</head>
<body>

<div id="app">
    <button-a></button-a>
    <button-a></button-a>
</div>

<div id="app2">
    <button-a></button-a>
</div>


<script src="../js/vue.js"></script>
<script>
    //去掉警告
    Vue.config.productionTip = false;

    Vue.component('button-a', {
        data() {
            return {
                count : 0
            }
        },
        template : `
            <button v-on:click="count++">
                点击量：{{count}}
            </button>
        `
    });


    //数据对象
    const dataObj = {
        message : '',
    };

    //创建一个Vue对象
    const app = new Vue({
        el : '#app',
        data : dataObj,

        //计算属性，固定名称
        computed : {

        },

        //方法
        methods : {

        }
    });

    const app2 = new Vue({
        el : '#app2'
    });








</script>
</body>
</html>
